'Copyright (c) 2008, Jonathan Allen

Public Class CatalogTitles
	Inherits DocumentCollectionBase(Of CatalogTitle)

	Public Sub New(ByVal connection As NetflixConnection, ByVal rawSource As String)
		MyBase.New(rawSource)

		For Each node In Source.<catalog_title>
			Me.Add(New CatalogTitle(connection, node))
		Next

	End Sub

	Public ReadOnly Property ResultsPerPage() As Integer
		Get
			Return CInt(Source.<results_per_page>.Value)
		End Get
	End Property

	Public ReadOnly Property StartIndex() As Integer
		Get
			Return CInt(Source.<start_index>.Value)
		End Get
	End Property

	Public ReadOnly Property NumberOfResults() As Integer
		Get
			Return CInt(Source.<number_of_results>.Value)
		End Get
	End Property

	Public Sub AddRange(ByVal source As CatalogTitles)
		For Each title In source
			Add(title)
		Next
	End Sub

End Class


